package com.lhc.nacosprovider.controller;

import com.lhc.nacosprovider.entity.DBTestEntity;
import com.lhc.nacosprovider.service.DBTestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author liuchaoqun
 * @date 2022/6/25
 * @Description 数据库学习
 */
@RestController
@RequestMapping("dbTest")
public class DBTestController {


    @Autowired
    DBTestService dbTestService;

    @GetMapping("/endToday")
    public List<DBTestEntity> todayEnd() {
        return dbTestService.getDataEndWithToday();
    }

    @GetMapping("/annotation")
    public String annotationTest(){
       return dbTestService.annotationTest();
    }
}
